package com.jeesite.modules.zx.sys.msg.push.web;

import java.util.List;

import javax.jms.Queue;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.sys.entity.Area;
import com.jeesite.modules.sys.service.AreaService;
import com.jeesite.modules.zx.course.entity.Tcourses;

@Controller
@RequestMapping(value = "${adminPath}/zx/update/data")
public class UpdateAreaController extends BaseController{
	@Autowired
	private AreaService areaService;
	@Autowired
    private Queue queue;
	@Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;
	@RequestMapping(value = {"list", ""})
	public String list(String areaCode, Model model) {
		
		return "modules/zx/upate/data";
	}
	@RequestMapping(value = {"updateData", ""})
	public String updateData(String areaCode, Model model) {
		System.out.println("发送小哦那行："+areaCode);
		jmsMessagingTemplate.convertAndSend(queue,areaCode);
		return "ok";
	}
}
